import request from '@/utils/request'

// 查询会员等级特权列表
export function loadUserPrivilege() {
  return request({
    url: '/system/userPrivilege/all',
    method: 'get'
  })
}

// 查询会员等级特权列表
export function listUserPrivilege(query) {
  return request({
    url: '/system/userPrivilege/list',
    method: 'get',
    params: query
  })
}

// 查询会员等级特权详细
export function getUserPrivilege(id) {
  return request({
    url: '/system/userPrivilege/' + id,
    method: 'get'
  })
}

// 新增会员等级特权
export function addUserPrivilege(data) {
  return request({
    url: '/system/userPrivilege',
    method: 'post',
    data: data
  })
}

// 修改会员等级特权
export function updateUserPrivilege(data) {
  return request({
    url: '/system/userPrivilege',
    method: 'put',
    data: data
  })
}

// 删除会员等级特权
export function delUserPrivilege(id) {
  return request({
    url: '/system/userPrivilege/' + id,
    method: 'delete'
  })
}

// 导出会员等级特权
export function exportUserPrivilege(query) {
  return request({
    url: '/system/userPrivilege/export',
    method: 'get',
    params: query
  })
}